home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší České Hry / Nej české hry.iso / hry / vesmirna becherovka / 2004 Vesmírná Becherovka / Becherovka.exe / scripts / DefineSprite_3463 / frame_3 / DoAction.as
Encoding:
Text File  |  2004-09-30  |  1.2 KB  |  52 lines

  1. function Speak(Osoba, SText, Orient, EngText, Driver)
  2. {
  3.    if(Orient == "R")
  4.    {
  5.       X = getProperty(Osoba, _X) + Osoba.hx * Osoba._xscale / 100;
  6.    }
  7.    else
  8.    {
  9.       X = getProperty(Osoba, _X) - Osoba.hx * Osoba._xscale / 100;
  10.    }
  11.    Y = getProperty(Osoba, _Y) + Osoba.hy * Osoba._yscale / 100;
  12.    if(!_root.menu.Eng)
  13.    {
  14.       _root.s.bubble.Text = SText;
  15.    }
  16.    else
  17.    {
  18.       _root.s.bubble.Text = EngText;
  19.    }
  20.    _root.s.bubble.Count = 12 + length(SText);
  21.    _root.s.bubble.i = 1;
  22.    _root.s.bubble.Osoba = Osoba;
  23.    _root.s.bubble.Driver = Driver;
  24.    _root.s.bubble.Orient = Orient;
  25.    if(Orient == "R")
  26.    {
  27.       _root.s.bubble.gotoAndPlay(4);
  28.       setProperty("_root.s.bubble", _X, X + Osoba._width / 1.5);
  29.    }
  30.    else
  31.    {
  32.       _root.s.bubble.gotoAndPlay(2);
  33.       setProperty("_root.s.bubble", _X, X - Osoba._width / 1.5);
  34.    }
  35.    setProperty("_root.s.bubble", _Y, Y - 30 * Osoba._xscale / 100);
  36.    if(Orient == "L" || Orient == "R")
  37.    {
  38.       tellTarget(Osoba)
  39.       {
  40.          gotoAndStop("SpeakR");
  41.          play();
  42.       }
  43.    }
  44.    else
  45.    {
  46.       tellTarget(Osoba)
  47.       {
  48.          gotoAndPlay("Speak" + Orient);
  49.       }
  50.    }
  51. }
  52.